

import http from '../api/http'

//解梦
export function dream(keyword, appkey = 'c71c5f9de9e38e1b', pagenum = 1, pagesize = 10) {
    const params = new URLSearchParams();
    params.append("appkey", appkey);
    params.append("keyword", keyword);
    params.append("pagenum", pagenum);
    params.append("pagesize", pagesize);
    const url = '/more/dream/search'
    return http.post(url, params)
}

//智能机器人
export function martRobot(question,appkey='c71c5f9de9e38e1b'){
    const params = new URLSearchParams();
    params.append("question", question);
    params.append("appkey", appkey);
    const url = '/more/iqa/query'
    return http.post(url, params)
}


//笑话
export function joke(pagenum=1,pagesize=10,sort='rand',appkey='c71c5f9de9e38e1b'){
    const params = new URLSearchParams();
    params.append("appkey", appkey);
    params.append("pagenum", pagenum);
    params.append("pagesize", pagesize);
    params.append("sort", sort);
    const url = '/more/xiaohua/text'
    return http.post(url,params)
}

//星座速配
export function constellation(men,women,key='45b34ebf1a17cbb7aa8a2ede60aac568'){
    const params = new URLSearchParams();
    params.append("key", key);
    params.append("men", men);
    params.append("women", women);
    const url = '/jH/xzpd/query'
    return http.post(url,params)
}